<%@page import="com.example.meal_ordering_system.entity.Admin"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<html>
<head>
	<link href="css/skin.css" rel="stylesheet" type="text/css" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script language="JavaScript">
		function check11() {
			if (document.form1.newname.value == "") {
				alert("Please enter a username!");
				document.form1.newname.focus();
				return false;
			}
			if (document.form1.newpwd.value == "") {
				alert("Please enter a password!");
				document.form1.newpwd.focus();
				return false;
			}
		}
	</script>
</head>

<body class="body">

<table width="100%" height="1" border="0" cellpadding="0"
	   cellspacing="0">
	<tr>
		<td width="17" valign="top" background="images/mail_leftbg.gif"><img
				src="images/left-top-right.gif" width="17" height="29" /></td>
		<td valign="top" background="images/content-bg.gif"><table
				width="100%" height="31" border="0" cellpadding="0" cellspacing="0"
				class="left_topbg" id="table2">
			<tr>
				<td height="31"><div class="titlebt">Admin Information</div></td>
			</tr>
		</table></td>
		<td width="16" valign="top" background="images/mail_rightbg.gif"><img
				src="images/nav-right-bg.gif" width="16" height="29" /></td>
	</tr>
	<tr>
		<td valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
		<td valign="top" bgcolor="#87CEFA">

			<div align="center">

				<form name="form1" action="/admin/update"
					  method="post" onSubmit="return check11()">
					<table id="table2" class="line_table"
						   style="width: 100%; margin: 0; padding: 0" cellSpacing="0"
						   cellPadding="0">
						<tbody style="margin: 0; padding: 0">
						<tr>
							<td class="line_table" align="center" colspan="8" height="20">
								<span class="left_bt2">Update Admin Information</span>
							</td>
						</tr>
						<%
							Admin admin = (Admin) session.getAttribute("admin_session");
						%>
						<tr>
							<td class="line_table" align="right" width="45%"><span
									class="left_bt2">Admin Name</span></td>
							<td class="line_table" align="left" width="55%"><input
									type="text" name="name" size="20" value="<%=admin.getName()%>"></td>
						</tr>
						<tr>
							<td class="line_table" align="right" width="45%"><span
									class="left_bt2">Admin Password</span></td>
							<td class="line_table" align="left" width="55%"><input
									type="password" name="pwd" size="20">
								<input type="hidden" name="id" value="<%=admin.getId()%>" />
							</td>
						</tr>
						<tr>
							<td class="line_table" align="center" colspan="8" height="20">
								<input type="submit" value="Update" />
							</td>
						</tr>
						</tbody>
					</table>
				</form>
			</div>

		</td>

		<td background="images/mail_rightbg.gif">&nbsp;</td>
	</tr>
	<tr>
		<td valign="bottom" background="images/mail_leftbg.gif"><img
				src="images/buttom_left2.gif" width="17" height="17" /></td>
		<td background="images/buttom_bgs.gif"><img
				src="images/buttom_bgs.gif" width="17" height="17"></td>
		<td valign="bottom" background="images/mail_rightbg.gif"><img
				src="images/buttom_right2.gif" width="16" height="17" /></td>
	</tr>
</table>

</body>
</html>
